<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*
         字符串：indexof('字符，index');
         从index 这个位置开始查找
        */

        var demo = "你好啊你好啊";
        console.log(demo.indexOf('好'));
        console.log(demo.indexOf('好',2));
        console.log(demo.indexOf('好', 4));
    </script>
</body>
</html>